{include file="inc/header.html"} 
<style>
	.f_yj{ behavior:url(iecss3.htc); }
</style>
<script type="text/javascript" src="{$TMPL}/js/jscharts_cr.js"></script>
<?php
$this->_var['indexcss'][] = $this->_var['TMPL_REAL']."/css/index.css";
?>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$indexcss"}" />
<div class="blank"></div>
<div class="blank10"></div>
<div class="feature">
	<a class="fea1">
		<i></i>
		<h3>多重保证</h3>
		<span>1000万本息保障机构全额担保</span>
	</a>
	<a class="fea2">
		<i></i>
		<h3>低门槛高收益</h3>
		<span>百元起投14-18%年化收益率</span>
	</a>
	<a class="fea3">
		<i></i>
		<h3>灵活的投资赎回</h3>
		<span>1000万本息保障机构全额担保</span>
	</a>
	<a class="fea4">
		<i></i>
		<h3>随时随地理财</h3>
		<span>1000万本息保障机构全额担保</span>
	</a>
</div>
<div class="total">
	<div class="tal1 t">
		<p>累计投资金额（元）</p>
		<div class="money">
			<span>{$VIRTUAL_MONEY_1_FORMAT}</span>万
		</div>
	</div>
	<div class="tal2 t">
		<p>累计创造收益（元）</p>
		<div class="money">
			<span>{$VIRTUAL_MONEY_2_FORMAT}</span>万
		</div>
	</div>
	<div class="tal3 t">
		<p>本息保证金（元）</p>
		<div class="money">
			<span>{$VIRTUAL_MONEY_3_FORMAT}</span>万
		</div>
	</div>
	<div class="blank1"></div>
	<div class="note">所有标的均为投标次日计息</div>
</div>
<div class="index_left f_l">
	<div class="list_title clearfix">
		<div class="list_tt list1 cur">投资列表</div>
		<div class="list_tt list2">债权转让</div>
	</div>
	<div class="list_cont panes">
		<div class="i_deal_list clearfix" style="display:block;">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tbody>
					<tr  border="0" style="background-color:#00bef0; color:#fff; height:34px;">
						<th style="width:30%">借款标题</th>
						<th style="width:15%">借款金额</th>
						<th style="width:10%">信用等级</th>
						<th style="width:10%">年利率</th>
						<th style="width:10%">借款期限</th>
						<th style="width:10%">借款进度</th>
						<th style="width:15%">借款状态</th>
					</tr>
					{foreach from=$deal_list item="deal" key=key name="deal"}
					<tr class="item {if $key mod 2 eq 1}item_1{/if} clearfix" {if $smarty.foreach.deal.last}style="border-bottom:0"{/if}>
						<td  class="tl" style="text-align:left;">
							&nbsp;&nbsp;<img src="{$deal.cate_info.icon}" width="24" height="24" class="ico" />
							<a href="{$deal.url}">{$deal.color_name}</a>
				    	</td>
						<td>
							<span>{$deal.borrow_amount_format}</span>
						</td>
						<td>
							<img src="{$TMPL}/images/{$deal.user.point_level}.png" align="absmiddle" title="{$deal.user.point_level}" alt="{$deal.user.point_level}" height="40" />
						</td>
						<td>
							<span>{$deal.rate} %</span>
						</td>
						<td>
							<span>{$deal.repay_time}</span>{if $deal.repay_time_type eq 0}天{else}个月{/if}
						</td>	
						<td>					
							<div class="graph-box">
								<p>
									{if  $deal.deal_status eq 5}
									100%
									{elseif $deal.deal_status eq 4}
									{function name='round' v='$deal.repay_progress_point' f=0}%
									{else}
									{function name="round" v=$deal.progress_point f=0}%
									{/if}
								</p>
		                    	<div id="graph-{$deal.id}"></div>
							</div>
							<script type="text/javascript">
							  	{if  $deal.deal_status eq 5}
								<!--//已还清-->
								var colors = ['#00bef0', '#e7e5e5'];
								var myData = new Array(['OK', 100], ['NO', 0]);
								{elseif $deal.deal_status eq 4}
								<!--//还款中-->
								var colors = ['#00bef0', '#e7e5e5'];
								var myData = new Array([' ', {function name='round' val=$deal.repay_progress_point f=2}], [' ', <?php echo 100-round($this->_var['deal']['repay_progress_point'],2) ?>]);
								{else}
								<!--//筹款中-->
								var colors = ['#00bef0', '#e7e5e5'];
								var myData = new Array([' ', {function name='round' val=$deal.progress_point f=2}], [' ', <?php echo 100-round($this->_var['deal']['progress_point'],2) ?>]);
								{/if}
								var myChart = new JSChart('graph-{$deal.id}', 'pie');
								myChart.setDataArray(myData);
								myChart.colorizePie(colors);
								myChart.setTitleColor('#8E8E8E');
								myChart.setTitleFontSize(0);
								myChart.setTextPaddingTop(280);
								myChart.setPieValuesDecimals(1);
								myChart.setPieUnitsFontSize(0);
								if($.browser.msie)
									myChart.setPieValuesFontSize(0);
								else
									myChart.setPieValuesFontSize(100000000);
								myChart.setPieValuesColor('#fff');
								myChart.setPieUnitsColor('#969696');
								myChart.setSize(46, 46);
								myChart.setPiePosition(0, 0);
								myChart.setPieRadius(23);
								myChart.setFlagColor('#1BB8E3');
								myChart.setFlagRadius(4);
								myChart.setTooltipOpacity(1);
								myChart.setTooltipBackground('#ddf');
								myChart.setTooltipPosition('ne');
								myChart.setTooltipOffset(2);
								myChart.draw();
							</script>
						</td>
						<td style="width:95px;">
							<a href="{$deal.url}">
								{if $deal.is_delete eq 2}
									<span class="f_white">待发布</span>
								{elseif $deal.is_wait eq 1}
									<span class="f_white">未开始</span>
								{elseif $deal.deal_status eq 5}
									<span class="f_white f_green">还款完毕</span>
								{elseif $deal.deal_status eq 4}
									<span class="f_white f_green">还款中</span>
								{elseif $deal.deal_status eq 0}
									<span class="f_white">等待材料</span>
								{elseif $deal.deal_status eq 1 && $deal.remain_time gt 0}
									<span class="f_white">筹款中</span>
								{elseif $deal.deal_status eq 2}
									<span class="f_white f_orange">满标</span>
								{elseif $deal.deal_status eq 3 || $deal.remain_time lte 0}
									<span class="f_white f_gray">流标</span>
								{/if}
							</a>
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			<a href="{url x="index" r="deals"}" title="{$LANG.MORE}" class="more">查看更多借款列表</a>
		</div>
		<div class="i_deal_list clearfix" style="display:none;">
				
				<table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:12px;">
					<tr  border="0" style="background-color:#00bef0; color:#fff; height:34px;">
				        <th>标题</th>
						<th style="width:15%">   转让人  / 承接人</th>
						<th style="width:15%">本/息/转让金</th>
						<th style="width:10%">利率</th>
						<th style="width:10%">待还/总期数</th>
						<th style="width:10%">信用等级</th>
						<th style="width:20%">剩余时间</th>
				    </tr>
					{foreach from=$transfer_list item="transfer" key=key name="transfer"}
					<tr class="item {if $key mod 2 eq 1}item_1{/if} tc">
		                <td style="text-align:left">
		                	&nbsp;&nbsp;<img src="{$transfer.cate_info.icon}" width="24" height="24" class="ico" /> 
		                    <a href="{$transfer.url}" target="_blank">
		                       {$transfer.name}
		                    </a>
		                </td>
		                <td>
	                        <div><a href="{$transfer.user.url}" target="_blank">{$transfer.user.user_name}</a></div>
							{if $transfer.tuser}
	                          <div><a href="{$transfer.tuser.url}" target="_blank">{$transfer.tuser.user_name}</a></div>
							{/if }
		                </td>
		                <td>
		                  	<div>{$transfer.left_benjin_format}</div>
							<div>{$transfer.left_lixi_format}</div>
		                    <div>
		                        {function name="format_price" v="$transfer.transfer_amount"}
		                    </div>
		                </td>    
		                <td>
		                    <div>
		                        {function name="number_format" v="$transfer.rate" f="2"}%
		                    </div>
		                      
		                </td>
		                <td>
		                    <span class="f_red">{$transfer.how_much_month}/{$transfer.repay_time}
		                </td>
		                <td>
		                    <a href="{$transfer.duser.url}" target="_blank"><img src="{$TMPL}/images/{$transfer.duser.point_level}.png" width="40" align="absmiddle" alt="{$transfer.duser.point_level}" title="{$transfer.duser.point_level}"></a>
		                </td>
		                <td>
                          	{if $transfer.t_user_id gt 0}
								已转让
							{else}
								{if $transfer.status eq 0}
									已撤销
								{else}
								{$transfer.remain_time_format}
								{if $transfer.remain_time lt 0}
								  	逾期还款
								{/if}
								{/if}
							{/if}
		                </td>
			        </tr>
					{/foreach}
				</table>
				<a href="{url x="index" r="transfer"}" title="{$LANG.MORE}" class="more">查看更多债权列表</a>
			</div>
	</div>
</div>
<div class="index_right f_r">
	<adv adv_id="首页右侧顶部广告" />
	<div class="r-block">
		<div class="gray_title clearfix">
			<div class="f_l f_dgray b">网站公告</div>
			<div class="f_r">
            	<div style="vertical-align: middle;_padding: 8px 0;">
	                <span style="font-weight: normal;">
	                    <a href="{url x="index" r="notice#list_notice"}"> 更多</a>
	                </span>
	                <span><img src="{$TMPL}/images/more.gif" align="absmiddle" alt="{$LANG.MORE}" style="" title="{$LANG.MORE}"></span>
	            </div>
        	</div>
		</div>
		<div class="notice-list clearfix">
			<ul>
				{foreach from=$notice_list item="notice"}
                <li style="padding:2px 0;">
                    <span>
					<a href="{$notice.url}" title="{$notice.title}">{function name="msubstr" v=$notice.title s=0 e=18}</a>
					</span>
                </li>
				{/foreach}
	        </ul>
		</div>
	</div>
	<div class="blank20"></div>
	<div class="clearfix pr">
		<img src="{$TMPL}/images/dosomthing.jpg" />
		<a class="borrow_out ps" href="{url x="index" r="deals"}">我要借出</a>
		<a class="borrow_in ps" href="{url x="index" r="borrow"}">我要借款</a>
	</div>
	<div class="blank20"></div>
	<div id="loadtop" class="r-block">
		<div class="ti clearfix">
			<div class="f_l">投资排行榜</div>
			<div id="rightTitls">
				<ul>
					<li class="current"><a rel="1">月</a></li>
					<li><a rel="2">周</a></li>
					
					<li><a rel="3">天</a></li>
				</ul>
			</div>
		</div>
		
		<div id="J_conbox" class="bdd" style="padding:5px;">
			<ul class="clearfix" rel="1">
				{foreach from="$month_load_top_list" item="load" name="loads"}
				<li class="clearfix pl10 pt10 pb10" style="border-bottom:1px dashed #eee">
					<span class="nums tc">{$smarty.foreach.loads.iteration}</span>
					<span class="uname">{function name="utf_substr" v="$load.user_name"}</span>
					<span class="money">{function name="round" v=$load.total_money f=2}元</span>
				</li>
				{/foreach}
			</ul>
			<ul class="clearfix hide" rel="2">
				{foreach from="$week_load_top_list" item="load" name="loads"}
				<li class="clearfix pl10 pt5 pb5">
					<span class="nums tc">{$smarty.foreach.loads.iteration}</span>
					<span class="uname">{function name="utf_substr" v="$load.user_name"}</span>
					<span class="money">{function name="round" v=$load.total_money f=2}元</span>
				</li>
				{/foreach}
			</ul>
			<ul class="clearfix hide" rel="3">
				{foreach from="$day_load_top_list" item="load" name="loads"}
				<li class="clearfix pl10 pt5 pb5">
					<span class="nums tc">{$smarty.foreach.loads.iteration}</span>
					<span class="uname">{function name="utf_substr" v="$load.user_name"}</span>
					<span class="money">{function name="round" v=$load.total_money f=2}元</span>
				</li>
				{/foreach}
			</ul>
		</div>
	</div>
	<script type="text/javascript">
		jQuery(function(){
			$("#loadtop #rightTitls a").click(function(){
				$("#loadtop #rightTitls a").parent().removeClass("current");
				$(this).parent().addClass("current");
				var rel=$(this).attr("rel");
				$("#loadtop #J_conbox ul").addClass("hide");
				$("#loadtop #J_conbox ul[rel='"+rel+"']").removeClass("hide");
			});
		});
	</script>
	<div class="blank20"></div>
	{insert name="success_deal_list"}
	<div class="blank20"></div>
	<div class="r-block">
		<div class="gray_title clearfix">
			<div class="f_l f_dgray b">使用技巧</div>
			<div class="f_r">
	        	<div style="vertical-align: middle;_padding: 8px 0;">
	                <span style="font-weight: normal;">
	                    <a href="{url x="index" r="usagetip"}"> {$LANG.MORE}</a>
	                </span>
	                <span><img src="{$TMPL}/images/more.gif" align="absmiddle" alt="{$LANG.MORE}" style="" title="{$LANG.MORE}"></span>
	            </div>
	    	</div>
		</div>
		<div class="clearfix" style="border:1px solid #e3e3e3; border-top:none; padding:5px 15px; ">
			<ul>
			{foreach from="$use_tech_list.list" item="use"}
            	<li class="f_l" style="width: 130px; padding: 2px;">
				 · <a href="{url x="index" r="usagetip" p="id=$use.id"}">{$use.title}</a>
				</li>
			{/foreach}
       		</ul>
		</div>
	</div>
</div>
{include file="inc/footer.html"}
<script type="text/javascript">
$(function(){	
	$("#case").find("li:odd").css("backgroundColor","#f9f9f9");

   	var $div_li = $(".list_title .list_tt");
   	$div_li.click(function(){
          $(this).addClass("cur").siblings().removeClass("cur");
          var div_index = $div_li.index(this);
          $(".panes").find(".i_deal_list").eq(div_index).show().siblings().hide();
   	});   	
})
</script>